//===============================================================================
// Microsoft patterns & practices
// Web Client Software Factory
//===============================================================================
// Copyright  Microsoft Corporation.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===============================================================================
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
//===============================================================================

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
using WCSFContrib.ECommerceCatalog.Admin;
using WCSFContrib.ECommerceCatalog.BusinessEntities;
using WCSFContrib.ECommerceCatalog.BusinessEntities.Enums;

namespace WCSFContrib.ECommerceCatalog.Admin.Tests.Mocks
{
    public class MockAdminController : IAdminController
    {
        // TODO: override controller methods to perform unit tests that uses this mock
        // Eg:
        //      public override GetOrders( int customerId ) {
        //          this.GetOrdersCalled =  true;
        //          this.CustomerID = customerId;
        //      }

        public bool GetOrdersCalled = false;
        public bool UpdateOrderStatusCalled = false;

        private ICollection<Order> _orders = new Collection<Order>();

        #region IAdminController Members

        public ICollection<Order> GetOrders()
        {
            _orders.Add(new Order(1, "userTest", DateTime.Now, null, null, OrderStatus.Open, null, null));
            _orders.Add(new Order(2, "userTest", DateTime.Now, null, null, OrderStatus.Open, null, null));
            
            GetOrdersCalled = true;

            return _orders;
        }

        public void UpdateOrderStatus(Order order)
        {
            UpdateOrderStatusCalled = true;
        }

        #endregion
    }
}
